﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ECube.Web.CMS.Extensions
{
    public static class StringExtensions
    {
        public static Guid ToGuid(this object value)
        {
            if (value == null) return Guid.Empty;
            Guid id ;
            try
            {
                id = new Guid(value.ToString());
            }
            catch {
                id = Guid.Empty;
            }
            return id;
        }
    }
}
